<html>
<title>dir</title>
<body>
<h1>dir</h1>
Displays the contents of a directory. 
<pre>
   <b>dir [d:][path][file] [options]</b>
</pre>
<h2>Options</h2>
<pre>
  <b>d:path\file</b>
  A specific file to display.

  <b>/p</b>
  Displays one page of the listing at a time.

  <b>/w</b>
  Displays the listing in wide format.

  <b>/a[:attribs]</b>
  Displays only the files and directories with the specified
  attributes.  Default is /a:hsdar.  You may use the following for
  attribs:
    h | -h
    Hidden files.  -h for files that are not hidden.

    s | -s
    System files.  -s for files that are not system files.

    d | -d
    Directories.  -d for files.

    a | -a
    Files with the archive bit.  -a for files without the archive bit.

    r | -r
    Read-only files.  -r for files that are not read-only.

  <b>/o[:order]</b>
  Displays the listing in the specified order. You may use the
  following to specify the sort order:
    a | -a
    Sort alphabetically A-Z.  -a to sort Z-A.

    e | -e
    Sort by extension A-Z.  -a to sort by extension Z-A.

    d | -d
    Sort by date and time.  -d to sort in reverse order.

    s | -s
    Sort by size, smallest-biggest.  -s to sort biggest-smallest.

    g | -g
    Group directories first.  -g to group directories last.

  <b>/s</b>
  List every occurrence in all subdirectories.

  <b>/b</b>
  Bare format. Lists one name per line.

  <b>/L</b>
  Displays names in lowercase.

  <b>/LFN</b>
  Display the long filename equivalent to the DOS 8.3 filename if LFN
  support is present (Only supported in the LFN-enabled version of FreeCOM.
</pre>
<h2>Notes</h2>
To customise the default appearance for dir, use the DIRCMD environment
variable. For instance:
<pre>
   <a href="set.htm">set</a> DIRCMD=/w/p
</pre>
To override something set in DIRCMD, use a hypen on that switch at the command
line. (for example /-w)
<hr>
<address>
<b>Copyright &copy; 1998 <a href="mailto:jhall@freedos.org">Jim Hall</a></b><br>
This file is derived from the FreeDOS Spec Command HOWTO.
See the file <a href="H2Cpying.txt">H2Cpying.txt</a> for copying conditions.
</address>
</body>
</html>
